<template>
  <!--禁言列表-->
  <div class="banned">
    <div class="banned-content">
      <div class="banned-item" v-for="item in bannedList">
        <div class="item-left">
          <div class="head">
            <img src="@/project/assets/images/logo.jpg" />
          </div>
          <div class="nickname">{{ item.nickname }}</div>
        </div>
        <div class="item-right">
          <el-button type="text" @click="remove">解除</el-button>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { deleteMute,find } from '@/project/service/mute'

export default {
  name: "banned",
  props:{
    //直播间id
    liveId:{
      type: String,
      default: ''
    }
  },
  data(){
    return{
      //禁言列表
      bannedList:[
        // {nickname:'刘备'},{nickname:'诸葛亮hhhhhhhh哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈'},{nickname:'关羽'},{nickname:'张飞'}
      ],
    }
  },
  created(){
    this.search()
    // this.remove()
  },
  methods:{
    search(){
      // let param = {mute:{live:{id:this.liveId}}}
      let param = {mute:{live:{id:'402703536720445440'}}}
      // find(param,data => {
      //   console.log(data)
      //   this.bannedList = data
      // })
    },
    //移除
    remove(){
      deleteMute({id: '390780767518908416'},data =>{
        // console.log(data)
      })
    }
  }
}
</script>

<style lang="less" scoped>
//禁言列表
.banned{
  width: 99.5%;
  border-left: 1px solid rgb(220, 223, 230);
  border-right: 1px solid rgb(220, 223, 230);
  border-bottom: 1px solid rgb(220, 223, 230);
  min-height: 720px;

  .banned-content{
    display: flex;
    justify-content: center;
    flex-wrap: wrap;

    .banned-item{
      display: flex;
      justify-content: space-between;
      align-items: center;
      border-bottom: 1px solid rgb(212, 212, 212);
      height: 60px;
      width: 90%;

      .item-left{
        display: flex;
        align-items: center;
        flex: 6;

        .head{
          width: 40px;
          height: 40px;

          img{
            width: 100%;
            height: 100%;
            border-radius: 50%;
          }
        }

        .nickname{
          margin-left: 15px;
          font-size: 14px;
          width: 150px;
          overflow: hidden;
          text-overflow:ellipsis;
          white-space: nowrap;
        }
      }

      .item-right{
        flex:1;
      }
    }
  }
}
</style>
